export default function loadingReducer(prevState = { loading: false }, action) {
  const { type, data } = action;
  switch (type) {
    case "change_loading":
      let newState = { ...prevState };
      newState.loading = data;
      return newState;
    default:
      return prevState;
  }
}
